package com.xx.pmis.services.implementations;

import java.util.List;

import com.xx.pmis.model.LuckyData;
import com.xx.pmis.persistence.dao.LuckyDataDAO;
import com.xx.pmis.services.LuckyDataService;

public class LuckyDataServiceImpl implements LuckyDataService {
	LuckyDataDAO luckyDataDAO = null;

	public LuckyDataServiceImpl(LuckyDataDAO luckyDataDAO) {
		super();
		this.luckyDataDAO = luckyDataDAO;
	}

	public void saveOrUpdateLuckyData(LuckyData luckyData) throws Exception {
		luckyDataDAO.saveOrUpdate(luckyData);
	}

	public void saveLuckyData(LuckyData luckyData) throws Exception {
		luckyDataDAO.save(luckyData);
	}

	public void deleteLuckyData(LuckyData luckyData) throws Exception {
		luckyDataDAO.delete(luckyData);
	}

	public LuckyData getLuckyDataByLuckyDataID(String ldID) throws Exception {
		LuckyData luckyData = luckyDataDAO.getLuckyDataByLuckyDataID(ldID);
		return luckyData;
	}

	public List<LuckyData> getAllLuckyData() throws Exception {
		List<LuckyData> luckyDatas = luckyDataDAO.getAllLuckyData();
		return luckyDatas;
	}

	public LuckyData getLuckyDataByIssueNumber(String issueNumber) throws Exception {
		LuckyData luckyData = luckyDataDAO.getLuckyDataByIssueNumber(issueNumber);
		return luckyData;
	}

}
